/*
 * RectangularShape.java  0.4.0 / Oct 24, 2010
 *
 * Copyright (c) 2010 - 2011, cute4j.com and contributors.
 *
 * This software is licensed under the LGPL version 2.1 license.
 * A copy of this license is included in the file LICENSE-LGPL.txt.
 */
package com.cute4j.swing.graphics;

/**
 * Abstract Rectangular Shape.
 *
 * @author Slobodan Vrkacevic
 * @version 0.4.0
 */
public abstract class RectangularShape implements Shape {

// Public Methods. -------------------------------------------------------------

  /**
   * Returns the x coordinate of the framing rectangle.
   *
   * @return the x coordinate of the framing rectangle
   */
  public abstract int getX();

  /**
   * Returns the y coordinate of the framing rectangle.
   *
   * @return the y coordinate of the framing rectangle
   */
  public abstract int getY();

  /**
   * Returns the width of the framing rectangle.
   *
   * @return the width of the framing rectangle
   */
  public abstract int getWidth();

  /**
   * Returns the height of the framing rectangle.
   *
   * @return the height of the framing rectangle
   */
  public abstract int getHeight();

// Shape Interface Implementation. ---------------------------------------------

  /**
   * {@inheritDoc}
   */
  public Rectangle getBounds() {
    return new Rectangle(getX(), getY(), getWidth(), getHeight());
  }

}
